import 'dart:io';

import 'package:package_info_plus/package_info_plus.dart';

class AppConfig {
  static String baseUrl = "http://192.168.5.180:9999";
  static bool isProductionEnv = false;

  static String appName = '';
  static String version = '';
  static String channelId = '4556';
  static String appChannel = '';
  static int serviceDifference = 0;
  
  // 测试阶段使用的统一图片地址
  static String testImage = "http://gips3.baidu.com/it/u=1821127123,1149655687&fm=3028&app=3028&f=JPEG&fmt=auto?w=720&h=1280";
  // http://192.168.5.201:9000/echomindcdn/
  // cdn地址改成这个  http://192.168.5.201:9000/echomind
  // cdn地址改成这个
  static String imageUrl = 'http://192.168.5.201:9000/echomind/';
  static Future setup() async {
    PackageInfo packageInfo = await PackageInfo.fromPlatform();
    appName = packageInfo.appName;
    version = packageInfo.version;
    if (Platform.isAndroid) {
      appChannel = "android_hi_friend";
    } else {
      appChannel = "ios_hi_friend";
    }
  }
}
